@color: #5365EA;

.switch {
  flex-shrink: 0;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  width: 100%;
  height: max-content;
  background: #fff;
  // border-radius: 2px;
  padding: 0 1px;
  margin: 0 -1px;
  cursor: pointer;

  &_label {
    position: relative;
    z-index: 1;
    padding: 0;
  }

  &_wrap {
    position: relative;
    float: left;
    padding: .07rem .15rem;
    font-size: 13px;
    font-weight: 400;
    // margin: 0 0 -1px -1px;
    border: .01rem solid rgba(232, 232, 232, 1);
    line-height: 16px;
    flex-shrink: 0;
    border-radius: 0;
    margin: 0;

    &:not(:last-child) {
      border-right-width: 0;
    }

    &:first-child {
      .switch_inner {

        border-radius: 2px 0 0 2px;
      }
    }

    &:hover {
      // &:not(:last-child) {
      //   border-right-width: 1px;
      // }
      border-right-width: 1px;
      z-index: 2;
      border-color: #5365EA;
    }

    // &:last-child {
    //   border-radius: 0 2px 2px 0;
    // }
  }
}
.active {
  z-index: 2;
  font-weight: 500;
  color: rgba(255, 255, 255, 1);
  background: @color !important;
}

//  换行的switch样式
.switch_box {
  display: inline-block;

  &_wrap {
    margin-top: 0;
    margin-bottom: 0;//1px;
    margin-left: 0;
    padding: 0 .15rem;

    line-height: .336rem;
    background-color: #fff;
    position: relative;
    display: inline-block;
    white-space: nowrap;
    vertical-align: middle;
    outline: none;
    cursor: pointer;

    &:first-child {
      .switch_box_inner {

        border-radius: 2px 0 0 2px;
      }
    }
  }

  &_inner {
    position: absolute;
    top: -0.005rem;
    bottom: -0.005rem;
    border: 1px solid rgba(232, 232, 232, 1);
    right: -.005rem;
    left: -.005rem;
    border-radius: 0;
    width: auto;
    height: auto;
    background-color: transparent;

    &:hover {
      // &:not(:last-child) {
      //   border-right-width: 1px;
      // }
      z-index: 3;
      border-color: @color;
    }
  }

  &_label {
    position: relative;
    z-index: 1;
    padding: 0;
  }
}

[data-theme="theme4"] {
  .switch {
    &:hover {
      border-color: @color;
    }

    &_wrap {
      border-color: #D9E6F2;

      &:hover {
        border-color: @color;
      }
    }

    .active {
      background: @color;
    }
  }

  .switch_box {
    &:hover {
      border-color: @color;
    }

    &_inner {
      border-color: #D9E6F2;
      &:hover {
        border-color: @color;
      }
    }

    .active {
      background: @color;
    }
  }
}
